<template>
  <el-dialog
    v-model="isShow"
    :title="title"
    width="640"
    :close-on-click-modal="false"
    @close="handleClose"
  >
    <el-form class="dialog-form" label-width="100px">
      <el-form-item label="结算司机：">
        张三
      </el-form-item>
      <el-form-item label="结算金额：">
        8888元
      </el-form-item>
      <!-- <el-form-item label="已结算金额：">
        8888元
      </el-form-item>
      <el-form-item label="待结算金额：">
        8888元
      </el-form-item> -->
      <el-form-item label="结算金额：">
        <el-input v-model="row.publicName" disabled placeholder="结算金额" >
          <template #append>元</template>
        </el-input>
      </el-form-item>
    </el-form>
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="isShow = false">取消</el-button>
        <el-button type="primary" :loading="btnLoading" @click="toSubmit">确定</el-button>
      </span>
    </template>
  </el-dialog>
</template>

<script setup lang="ts">
import {ElMessage, ElMessageBox} from 'element-plus'
import { ref, reactive, inject, getCurrentInstance, ComponentInternalInstance } from 'vue';
const {proxy} = getCurrentInstance() as ComponentInternalInstance;
let optionData:any = inject('optionData'); 
const emit = defineEmits(['confirm']);
let isShow = ref(false);
let btnLoading = ref(false);
let title = ref('结算');
let row:any = reactive({});
const init = (data:any) => {
  row = data;
  isShow.value = true;
};

const handleClose = () => {
  console.log('关闭');
};
const toSubmit = () => {
  console.log('提交');
};

defineExpose({
  init,
})
</script>

<style>

</style>